import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    user: {},
    userobj: "",
    musicUrls: "",
    _storageUrl: "sessionStorage"
  },
  getters: {},
  mutations: {
    user(state, payload) {
      state.user = payload;
    },
    music(state, payload) {
      state.musicUrls = payload;
    }
  },
  actions: {
    user(context, payload) {
      context.commit("user", payload);
    },
    music(context, payload) {
      context.commit("music", payload);

    }
  },
});
